File tree Expand file tree Collapse file tree 1 file changed +6
-12
lines changed Expand file tree Collapse file tree 1 file changed +6
-12
lines changed Original file line number Diff line number Diff line change 1- """
2-
3- """
4-
51from collections import namedtuple
62from io import BytesIO
73import os
@@ -67,20 +63,18 @@ def get_storage_root(cls, storage_type):
6763 result = CARD_LOCALROOT
6864 if result is None :
6965 current_path = os .getcwd ()
70- check_dir = os .path .join (current_path , DATASTORE_LOCAL_DIR , CARD_SUFFIX )
66+ check_dir = os .path .join (current_path , DATASTORE_LOCAL_DIR )
7167 check_dir = os .path .realpath (check_dir )
7268 orig_path = check_dir
7369 while not os .path .isdir (check_dir ):
7470 new_path = os .path .dirname (current_path )
7571 if new_path == current_path :
76- break # We are no longer making upward progress
72+ # No longer making upward progress so we
73+ # return the top level path
74+ return os .path .join (orig_path , CARD_SUFFIX )
7775 current_path = new_path
78- check_dir = os .path .join (
79- current_path , DATASTORE_LOCAL_DIR , CARD_SUFFIX
80- )
81- result = orig_path
82-
83- return result
76+ check_dir = os .path .join (current_path , DATASTORE_LOCAL_DIR )
77+ return os .path .join (check_dir , CARD_SUFFIX )
8478 else :
8579 # Let's make it obvious we need to update this block for each new datastore backend...
8680 raise NotImplementedError (
You can’t perform that action at this time.
0 commit comments