@staticmethod
def parse_args(args):
- return [Sig._parse_arg_desc(arg) for arg in args.split()]
+ return [Sig._parse_arg_desc(arg) for arg in args]
TEMPLATE = '''
cmds = sorted(cmds, key=lambda cmd: cmd.prefix)
self._render_cmds(cmds)
- orig_rgw_mod = sys.modules['pybind_rgw_mod']
- sys.modules['rgw'] = orig_rgw_mod
+ if 'pybind_rgw_mod' in sys.modules:
+ orig_rgw_mod = sys.modules['pybind_rgw_mod']
+ sys.modules['rgw'] = orig_rgw_mod
return []
os.path.dirname(
os.path.abspath(__file__)))
-pybind_rgw_mod = __import__('rgw', globals(), locals(), [], 0)
-sys.modules['pybind_rgw_mod'] = pybind_rgw_mod
-
+# it could be that ceph was built without RGW support
+# e.g. in a local development environment
+try:
+ pybind_rgw_mod = __import__('rgw', globals(), locals(), [], 0)
+ sys.modules['pybind_rgw_mod'] = pybind_rgw_mod
+except Exception:
+ pass
def parse_ceph_release():
with open(os.path.join(top_level, 'src/ceph_release')) as f: