Last active
December 21, 2015 02:08
-
-
Save jvanasco/6232500 to your computer and use it in GitHub Desktop.
diff against current graphite/carbon/whisper release (0.9.10) to ensure intermediate directories exist in the whisper database ( otherwise, stuff fails )
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- whisper.py 2013-08-14 11:59:04.000000000 -0400 | |
+++ whisper.py.fix 2013-08-14 11:59:17.000000000 -0400 | |
@@ -324,11 +324,6 @@ | |
if os.path.exists(path): | |
raise InvalidConfiguration("File %s already exists!" % path) | |
+ # ensure the path | |
+ _path_dir = os.path.split(path) | |
+ if not os.path.exists( _path_dir ): | |
+ os.makedirs( _path_dir ) | |
+ | |
fh = open(path,'wb') | |
if LOCK: | |
fcntl.flock( fh.fileno(), fcntl.LOCK_EX ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment