Explorar el Código

Make destination dir before execution, or bail out.

Heikki Hokkanen hace 18 años
padre
commit
6ba3c165ca
Se han modificado 1 ficheros con 5 adiciones y 0 borrados
  1. 5
    0
      statgit

+ 5
- 0
statgit Ver fichero

@@ -704,6 +704,11 @@ if len(sys.argv) <  3:
704 704
 gitpath = sys.argv[1]
705 705
 outputpath = os.path.abspath(sys.argv[2])
706 706
 
707
+os.makedirs(outputpath)
708
+if not os.path.isdir(outputpath):
709
+	print 'FATAL: Output path is not a directory or does not exist'
710
+	sys.exit(1)
711
+
707 712
 print 'Git path: %s' % gitpath
708 713
 print 'Output path: %s' % outputpath
709 714