Commits

Seraphim Mellos  committed 14f6b86

Sometimes, source_file is not necessary in the config file.

  • Participants
  • Parent commits 6fac9db

Comments (0)

Files changed (1)

File txclib/commands.py

 
     if execute:
         try:
-
             prj.config.get("%s" % resource, "source_file")
         except ConfigParser.NoSectionError:
             raise Exception("No resource with slug \"%s\" was found.\nRun 'tx set --auto"
         prj.config.get("%s.%s" % (proj, res), "source_file")
     except ConfigParser.NoSectionError:
         prj.config.add_section("%s.%s" % (proj, res))
+    except ConfigParser.NoOptionError:
+        pass
     finally:
         prj.config.set("%s.%s" % (proj, res), "source_file",
            path_to_file)
         map_object = prj.config.get("%s.%s" % (proj, res), "source_file")
     except ConfigParser.NoSectionError:
         map_object = None
+    except ConfigParser.NoOptionError:
+        pass
 
     if not map_object:
         raise Exception("tx: You should first run 'set --source' to map the source file.")