mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-25 22:36:13 +01:00
fuseosc: do not throw exception when no connectivity available
This commit is contained in:
parent
c0ac2a9207
commit
35a5c21dab
13
fuse/fuseosc
13
fuse/fuseosc
@ -5,7 +5,6 @@ import osc.conf
|
||||
import osc.core
|
||||
import sys
|
||||
import fuse
|
||||
from fuse import Fuse
|
||||
import stat
|
||||
import os
|
||||
import errno
|
||||
@ -35,10 +34,10 @@ class CacheEntry(object):
|
||||
self.handle = None
|
||||
self.tmpname = None
|
||||
|
||||
class oscFS(Fuse):
|
||||
class oscFS(fuse.Fuse):
|
||||
|
||||
def __init__(self, *args, **kw):
|
||||
Fuse.__init__(self, *args, **kw)
|
||||
fuse.Fuse.__init__(self, *args, **kw)
|
||||
print 'OK'
|
||||
|
||||
def getattr(self, path):
|
||||
@ -183,8 +182,12 @@ class oscFS(Fuse):
|
||||
return -errno.ENOSYS
|
||||
|
||||
def fill_projects():
|
||||
for prj in osc.core.meta_get_project_list(osc.conf.config['apiurl']):
|
||||
projects.append( '/' + prj.replace(':', ':/') )
|
||||
try:
|
||||
for prj in osc.core.meta_get_project_list(osc.conf.config['apiurl']):
|
||||
projects.append( '/' + prj.replace(':', ':/') )
|
||||
except:
|
||||
print 'failed'
|
||||
sys.exit(1)
|
||||
|
||||
if __name__ == '__main__':
|
||||
print 'Loading config ...',
|
||||
|
Loading…
Reference in New Issue
Block a user