Browse Source

Use python 2 makedir

Tyler Hallada 7 years ago
parent
commit
4cb8359eb8
1 changed files with 6 additions and 3 deletions
  1. 6 3
      results.py

+ 6 - 3
results.py

@@ -6,9 +6,12 @@ from beaker.cache import CacheManager
6 6
 from beaker.util import parse_cache_config_options
7 7
 from ddg import search
8 8
 
9
-os.makedirs('cache', exist_ok=True)
10
-os.makedirs('cache/data', exist_ok=True)
11
-os.makedirs('cache/lock', exist_ok=True)
9
+if not os.path.exists('cache'):
10
+    os.makedirs('cache')
11
+if not os.path.exists('cache/data'):
12
+    os.makedirs('cache/data')
13
+if not os.path.exists('cache/lock'):
14
+    os.makedirs('cache/lock')
12 15
 
13 16
 cache_opts = {
14 17
     'cache.type': 'file',