def _get_user_data(self, conf): if 'admin_key' in conf: return UserData.from_key(conf['admin_key']) elif 'admin_key_path' in conf: return UserData.from_key_path(conf['admin_key_path']) else: raise ValueError( "You must provide either 'admin_key' or 'admin_key_path' " "in the sx config.")