@@ -1474,11 +1474,8 @@ def index(self, local_loc, remote_loc, isVerbose=False):
14741474 raise
14751475
14761476 # See if filesystem exists
1477- try :
1478- fs_t = t .get_table ("filesystem" )
1479- if isVerbose :
1480- print ("fs table exists already, skipping for now" )
1481- except :
1477+ fs_t = t .get_table ("filesystem" )
1478+ if fs_t .empty :
14821479 if isVerbose :
14831480 print ( "Creating new fs table" )
14841481 # Create new filesystem collection with origin and remote locations
@@ -1518,7 +1515,8 @@ def copy(self, tool="copy", isVerbose=False, **kwargs):
15181515
15191516 try :
15201517 #f = os.path.join((local_loc, str(self.project_name+".db") ))
1521- f = self .local_location + "/" + self .project_name + ".db"
1518+ #f = self.local_location+"/"+self.project_name+".db"
1519+ f = self .project_name + ".db"
15221520 if isVerbose :
15231521 print ("db: " , f )
15241522 if os .path .exists (f ):
@@ -1528,9 +1526,8 @@ def copy(self, tool="copy", isVerbose=False, **kwargs):
15281526 raise
15291527
15301528 # See if filesystem exists
1531- try :
1532- fs_t = t .get_table ("filesystem" )
1533- except :
1529+ fs_t = t .get_table ("filesystem" )
1530+ if fs_t .empty :
15341531 print ( " Filesystem table not found. Try running Index first." )
15351532 print ( " Data copy failed. " )
15361533 return
@@ -1555,8 +1552,9 @@ def copy(self, tool="copy", isVerbose=False, **kwargs):
15551552
15561553 # Database movement
15571554 if isVerbose :
1558- print ( " cp " + os .path .join (self .local_location , str (self .project_name + ".db" ) ) + " " + os .path .join (self .remote_location , self .project_name , self .project_name + ".db" ) )
1559- shutil .copy2 (os .path .join (self .local_location , str (self .project_name + ".db" ) ), os .path .join (self .remote_location , self .project_name , self .project_name + ".db" ) )
1555+ print ( " cp " + str (self .project_name + ".db" ) + " " + os .path .join (self .remote_location , self .project_name , self .project_name + ".db" ) )
1556+ #shutil.copy2(os.path.join(self.local_location, str(self.project_name+".db") ), os.path.join(self.remote_location, self.project_name, self.project_name+".db" ) )
1557+ shutil .copy2 (str (self .project_name + ".db" ), os .path .join (self .remote_location , self .project_name , self .project_name + ".db" ) )
15601558
15611559 print ( " Data Copy Complete! " )
15621560 elif tool == "scp" :
0 commit comments