diff toolfactory/rgToolFactory2.py @ 100:c749364c2283 draft

Uploaded
author fubar
date Mon, 23 Nov 2020 03:12:37 +0000
parents d4d88d393285
children 557d5f06f213
line wrap: on
line diff
--- a/toolfactory/rgToolFactory2.py	Mon Nov 23 02:22:01 2020 +0000
+++ b/toolfactory/rgToolFactory2.py	Mon Nov 23 03:12:37 2020 +0000
@@ -39,6 +39,7 @@
 import time
 
 
+from bioblend import ConnectionError
 from bioblend import toolshed
 
 # import docker
@@ -781,6 +782,7 @@
         rnames = [x.get("name", "?") for x in repos]
         rids = [x.get("id", "?") for x in repos]
         sto.write(f"############names={rnames} rids={rids}\n")
+        sto.write(f"############names={repos}\n")
         tfcat = "ToolFactory generated tools"
         if self.args.tool_name not in rnames:
             tscat = ts.categories.get_categories()
@@ -804,10 +806,12 @@
         else:
             i = rnames.index(self.args.tool_name)
             tid = rids[i]
-        res = ts.repositories.update_repository(
-            id=tid, tar_ball_path=self.newtarpath, commit_message=None
-        )
-        sto.write(f"#####update res={res}\n")
+        try:
+            res = ts.repositories.update_repository(
+                id=tid, tar_ball_path=self.newtarpath, commit_message=None)
+            sto.write(f"#####update res={res}\n")
+        except ConnectionError:
+            sto.write("Probably no change to repository - bioblend shed upload failed\n")
         sto.close()
 
     def eph_galaxy_load(self):
@@ -1241,12 +1245,12 @@
         r.makeToolTar()
     else:
         r.makeToolTar()
-        #r.planemo_shedLoad()
+        r.planemo_shedLoad()
         r.shedLoad()
         r.eph_galaxy_load()
         retcode = r.gal_tool_test()  # writes outputs
         r.makeToolTar()
-        #r.planemo_shedLoad()
+        r.planemo_shedLoad()
         r.shedLoad()
         r.eph_galaxy_load()
         retcode = r.gal_test()