1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-11-10 06:46:15 +01:00

get_api_url() diagnostics now includes ESTALE.

This commit is contained in:
Juergen Weigert 2011-04-06 15:31:36 +02:00
parent acbf21f7db
commit b7328b6adf

View File

@ -156,7 +156,15 @@ class Osc(cmdln.Cmdln):
return self._str(doc)
def get_api_url(self):
localdir = os.getcwd()
try:
localdir = os.getcwd()
except Exception, e:
## check for Stale NFS file handle: '.'
try: os.stat('.')
except Exception, ee: e = ee
print >>sys.stderr, "os.getcwd() failed: ", e
sys.exit(1)
if (is_package_dir(localdir) or is_project_dir(localdir)) and not self.options.apiurl:
return store_read_apiurl(os.curdir)
else: