Browse Source

Make destination dir before execution, or bail out.

Heikki Hokkanen 18 years ago
parent
commit
6ba3c165ca
1 changed files with 5 additions and 0 deletions
  1. 5
    0
      statgit

+ 5
- 0
statgit View File

704
 gitpath = sys.argv[1]
704
 gitpath = sys.argv[1]
705
 outputpath = os.path.abspath(sys.argv[2])
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
 print 'Git path: %s' % gitpath
712
 print 'Git path: %s' % gitpath
708
 print 'Output path: %s' % outputpath
713
 print 'Output path: %s' % outputpath
709
 
714