mirror of
https://github.com/openSUSE/osc.git
synced 2025-02-04 10:36:17 +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 osc.core
|
||||||
import sys
|
import sys
|
||||||
import fuse
|
import fuse
|
||||||
from fuse import Fuse
|
|
||||||
import stat
|
import stat
|
||||||
import os
|
import os
|
||||||
import errno
|
import errno
|
||||||
@ -35,10 +34,10 @@ class CacheEntry(object):
|
|||||||
self.handle = None
|
self.handle = None
|
||||||
self.tmpname = None
|
self.tmpname = None
|
||||||
|
|
||||||
class oscFS(Fuse):
|
class oscFS(fuse.Fuse):
|
||||||
|
|
||||||
def __init__(self, *args, **kw):
|
def __init__(self, *args, **kw):
|
||||||
Fuse.__init__(self, *args, **kw)
|
fuse.Fuse.__init__(self, *args, **kw)
|
||||||
print 'OK'
|
print 'OK'
|
||||||
|
|
||||||
def getattr(self, path):
|
def getattr(self, path):
|
||||||
@ -183,8 +182,12 @@ class oscFS(Fuse):
|
|||||||
return -errno.ENOSYS
|
return -errno.ENOSYS
|
||||||
|
|
||||||
def fill_projects():
|
def fill_projects():
|
||||||
for prj in osc.core.meta_get_project_list(osc.conf.config['apiurl']):
|
try:
|
||||||
projects.append( '/' + prj.replace(':', ':/') )
|
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__':
|
if __name__ == '__main__':
|
||||||
print 'Loading config ...',
|
print 'Loading config ...',
|
||||||
|
Loading…
Reference in New Issue
Block a user