Seraphim Mellos avatar Seraphim Mellos committed 886ee94

Added backwards compatibilty for the resource API details

Comments (0)

Files changed (1)

txclib/commands.py

     """
     utils.MSG("Auto configuring local project from remote URL...")
 
-
     type, vars = utils.parse_tx_url(url)
     prj = project.Project(path_to_tx)
     username, password = prj.getset_host_credentials(vars['hostname'])
 
-
     if type == 'project':
         utils.MSG("Getting details for project %s" % vars['project'])
         proj_info = utils.get_project_details(vars['hostname'], username,
         utils.MSG("Getting details for release %s" % vars['release'])
         rel_info = utils.get_release_details(vars['hostname'], username,
             password, vars['project'], vars['release'])
-        resources = [ '.'.join([r['project_slug'], r['slug']]) for r in rel_info['resources'] ]
+        resources = [ '.'.join([r['project_slug'] if r.has_key('project_slug')
+            else vars['project'], r['slug']]) for r in rel_info['resources'] ]
         utils.MSG("%s resources found. Configuring..." % len(resources))
     elif type == 'resource':
         utils.MSG("Getting details for resource %s" % vars['resource'])
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.