@@ -74,7 +74,7 @@ def _write(self, data, newline=True, console=True, content_type=None):
7474 kb .dataOutputFlag = True
7575
7676 def setOutputFile (self ):
77- self ._outputFile = "%s%slog" % (conf .outputPath , os . sep )
77+ self ._outputFile = os . path . join (conf .outputPath , "log" )
7878 try :
7979 self ._outputFP = codecs .open (self ._outputFile , "ab" if not conf .flushSession else "wb" , UNICODE_ENCODING )
8080 except IOError , ex :
@@ -380,15 +380,15 @@ def dbTableValues(self, tableValues):
380380 self ._write (tableValues , content_type = CONTENT_TYPE .DUMP_TABLE )
381381 return
382382
383- dumpDbPath = "%s%s%s" % (conf .dumpPath , os . sep , re .sub (r"[^\w]" , "_" , unsafeSQLIdentificatorNaming (db )))
383+ dumpDbPath = os . path . join (conf .dumpPath , re .sub (r"[^\w]" , "_" , unsafeSQLIdentificatorNaming (db )))
384384
385385 if conf .dumpFormat == DUMP_FORMAT .SQLITE :
386- replication = Replication ("%s%s%s.sqlite3" % (conf .dumpPath , os . sep , unsafeSQLIdentificatorNaming (db )))
386+ replication = Replication (os . path . join (conf .dumpPath , "%s.sqlite3" % unsafeSQLIdentificatorNaming (db )))
387387 elif conf .dumpFormat in (DUMP_FORMAT .CSV , DUMP_FORMAT .HTML ):
388388 if not os .path .isdir (dumpDbPath ):
389389 os .makedirs (dumpDbPath , 0755 )
390390
391- dumpFileName = "%s%s%s .%s" % (dumpDbPath , os . sep , unsafeSQLIdentificatorNaming (table ), conf .dumpFormat .lower ())
391+ dumpFileName = os . path . join ( dumpDbPath , "%s.%s" % (unsafeSQLIdentificatorNaming (table ), conf .dumpFormat .lower () ))
392392 appendToFile = os .path .isfile (dumpFileName ) and any ((conf .limitStart , conf .limitStop ))
393393 dumpFP = openFile (dumpFileName , "wb" if not appendToFile else "ab" )
394394
0 commit comments