Subversion Repositories SmartDukaan

Rev

Rev 13843 | Rev 13850 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 13843 Rev 13849
Line 18... Line 18...
18
parser.add_option("-H", "--host", dest="hostname",
18
parser.add_option("-H", "--host", dest="hostname",
19
                      default="localhost",
19
                      default="localhost",
20
                      type="string", help="The HOST where the DB server is running",
20
                      type="string", help="The HOST where the DB server is running",
21
                      metavar="HOST")
21
                      metavar="HOST")
22
 
22
 
-
 
23
(options, args) = parser.parse_args()
23
DataService.initialize(db_hostname=options.hostname)
24
DataService.initialize(db_hostname=options.hostname)
24
 
25
 
25
def get_mongo_connection(host='localhost', port=27017):
26
def get_mongo_connection(host='localhost', port=27017):
26
    global con
27
    global con
27
    if con is None:
28
    if con is None: