Subversion Repositories SmartDukaan

Rev

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

Rev 14245 Rev 14248
Line 17... Line 17...
17
parser = optparse.OptionParser()
17
parser = optparse.OptionParser()
18
parser.add_option("-m", "--m", dest="mongoHost",
18
parser.add_option("-m", "--m", dest="mongoHost",
19
                      default="localhost",
19
                      default="localhost",
20
                      type="string", help="The HOST where the mongo server is running",
20
                      type="string", help="The HOST where the mongo server is running",
21
                      metavar="HOST")
21
                      metavar="HOST")
-
 
22
parser.add_option("-s", "--s", dest="server",
-
 
23
                      default="localhost",
-
 
24
                      type="string", help="The HOST where the mongo server is running",
-
 
25
                      metavar="HOST")
22
 
26
 
23
(options, args) = parser.parse_args()
27
(options, args) = parser.parse_args()
24
 
28
 
25
 
29
 
26
class __SkuInfo:
30
class __SkuInfo:
Line 70... Line 74...
70
        except OSError:
74
        except OSError:
71
            pass
75
            pass
72
    output = open(filePath, 'ab+')
76
    output = open(filePath, 'ab+')
73
    json.dump(autoSuggestList, output)
77
    json.dump(autoSuggestList, output)
74
    output.close()
78
    output.close()
75
    if options.mongoHost !='localhost':
79
    if options.server !='localhost':
76
        try:
80
        try:
77
            os.system("scp "+filePath +" root@dtr:"+destFilePath)
81
            os.system("scp "+filePath +" root@"+options.server+":"+destFilePath)
78
        except:
82
        except:
79
            shutil.copy2(filePath, destFilePath)
83
            shutil.copy2(filePath, destFilePath)
80
    
84
    
81
    
85
    
82
 
86