本文整理汇总了Python中peerdrive.Connector.sysStore方法的典型用法代码示例。如果您正苦于以下问题:Python Connector.sysStore方法的具体用法?Python Connector.sysStore怎么用?Python Connector.sysStore使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类peerdrive.Connector
的用法示例。
在下文中一共展示了Connector.sysStore方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: len
# 需要导入模块: from peerdrive import Connector [as 别名]
# 或者: from peerdrive.Connector import sysStore [as 别名]
parser.add_option("-v", "--verbose", action="store_true", help="Verbose output")
(options, args) = parser.parse_args()
if len(args) > 2:
parser.error("incorrect number of arguments")
if options.auto and not options.persist:
parser.error("'--auto' depends on '--persist'")
if options.persist and (len(args) < 2):
parser.error("incorrect number of arguments")
fstab = struct.FSTab()
if len(args) == 0:
enum = Connector().enum()
if options.verbose:
printStore(enum.sysStore(), True)
for store in enum.regularStores():
auto = False
if store.label in fstab.knownLabels():
auto = fstab.get(store.label).get('auto', False)
printStore(store, options.verbose, auto)
if options.verbose:
print "\nUnmounted stores:"
unmounted = set(fstab.knownLabels()) - set([s.label for s in enum.regularStores()])
for label in unmounted:
store = fstab.get(label)
type = store.get("type", "file")
options = store.get("options", "")
credentials = store.get("credentials", "")
auto = store.get("auto", False)
line = "'%s' as '%s' type '%s'" % (store['src'], label, type)