Commit ea3e3ad4 authored by Rob Carleski's avatar Rob Carleski 🇮🇸
Browse files

bugfixes

parent 0f57d9af
......@@ -56,7 +56,18 @@ class SharedAccount:
'value': 'shared'
}]
)
except boxsdk.exception.BoxAPIException as e:
if e.status in [409, 403]:
self.logger.info(
e.message,
extra={'entity': self.account}
)
return
else:
self.logger.error(e, extra={'entity': self.account})
return
try:
boxAccount.update_info({'is_sync_enabled': False})
self.shared_box_folder = boxClient.as_user(
......@@ -213,6 +224,8 @@ https://documentation.its.umich.edu/node/339/
if type(client.group_data['memberExternalRaw']) is list:
if ext_addr not in client.group_data['memberExternalRaw']:
needs_update = True
else:
needs_update = True
if needs_update:
self.logger.info(
......@@ -240,6 +253,10 @@ https://documentation.its.umich.edu/node/339/
extra={'entity': self.account}
)
client.reserve_group(self.account)
self.logger.info(
'Fetching new Mcommunity group',
extra={'entity': self.account}
)
client.fetch_group(self.account)
except Exception as e:
self.logger.info(e, extra={'entity': self.account})
......@@ -440,7 +457,7 @@ def main():
# Get the root logger and set the debug level
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
logger.setLevel(logging.INFO)
# Create a syslog handler, set format, and associate.
sh = logging.handlers.SysLogHandler(
......@@ -459,7 +476,6 @@ def main():
sa = SharedAccount(vars(args), config)
sa.set_up_mcommunity_group()
exit(2)
sa.set_kerberos_password()
if sa.service in ['box', 'both']:
sa.create_box()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment