Commits

Anonymous committed 140101c

fix makedirs "File exists" issue

Comments (0)

Files changed (1)

apps/Scan/commands.py

         for path in list(ScanPathes.filter(ScanPathes.c.release==True)):
             #print path.path
             dpdst = os.path.join(dpexport,path.path)
-            os.makedirs(dpdst)
+            if not os.path.exists(dpdst):
+                os.makedirs(dpdst)
             dpsrc = os.path.join(settings.SCAN.DIR,path.path)
             cmd = "rsync -av %s/ %s/"%(dpsrc,dpdst)
             print cmd