本文整理汇总了Python中organization.Organization.get_orgs方法的典型用法代码示例。如果您正苦于以下问题:Python Organization.get_orgs方法的具体用法?Python Organization.get_orgs怎么用?Python Organization.get_orgs使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类organization.Organization
的用法示例。
在下文中一共展示了Organization.get_orgs方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _upgrade_data
# 需要导入模块: from organization import Organization [as 别名]
# 或者: from organization.Organization import get_orgs [as 别名]
def _upgrade_data(self):
from pritunl import __version__
version = '0.10.1'
version_path = os.path.join(self.data_path, VERSION_NAME)
if os.path.isfile(version_path):
with open(version_path, 'r') as version_file:
version = version_file.readlines()[0].strip()
if version == '0.10.1':
logger.info('Upgrading data from v0.10.1...')
from organization import Organization
for org in Organization.get_orgs():
for user in org.get_users():
user._upgrade_0_10_2()
if version != __version__:
with open(version_path, 'w') as version_file:
version = version_file.write('%s\n' % __version__)