Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __init__(self, cmd, args):
CommandBase.__init__(self,
cmd, args,
load_recipes=False,
require_prefix=False,
)
# Figure out which config file to write to
self.cfg_file = self.cfg.local_cfg
prefix = self.cfg.get_active_prefix()
if self.args.config_file is not None:
self.cfg_file = self.args.config_file
elif prefix.prefix_dir is not None and prefix.prefix_src == "cli":
self.cfg_file = prefix.cfg_file
self.log.info("Using config file: {0}".format(self.cfg_file))
def __init__(self, cmd, args):
CommandBase.__init__(self,
cmd, args,
load_recipes=False,
require_prefix=True,
)
self.args.packages = args.packages[0]
if len(self.args.packages) == 0:
self.log.error("No packages specified.")
raise PBException("No packages specified.")
# Do not allow any non-source packagers for this:
self.cfg.set('packagers', '')
self.pm = package_manager.PackageManager()
if not self.args.no_deps:
self.args.packages = self.get_dependees(self.args.packages)
def __init__(self, cmd, args):
CommandBase.__init__(
self,
cmd, args,
load_recipes=False,
require_prefix=True,
)
def __init__(self, cmd, args):
CommandBase.__init__(self,
cmd, args,
load_recipes=False,
require_prefix=False,
require_inventory=False
)
def __init__(self, cmd, args):
CommandBase.__init__(self, cmd, args, require_prefix=True)
verb = "Showing" if self.args.value is None else "Setting"
if self.args.key is None:
print("{verb} package state:".format(verb=verb))
else:
print("{verb} value for key `{key}':".format(verb=verb, key=self.args.key))
def __init__(self, cmd, args):
CommandBase.__init__(self,
cmd, args,
load_recipes=True,
require_prefix=False,
)
self.package_manager = package_manager.PackageManager()
if args.all:
self.args.packages = recipe_manager.list_all()
else:
self.args.packages = args.packages[0] # wat?
if len(self.args.packages) == 0:
self.log.error("No packages specified.")
return 1
def __init__(self, cmd, args):
CommandBase.__init__(self,
cmd, args,
load_recipes=False,
require_prefix=False,
)
def __init__(self, cmd, args):
CommandBase.__init__(self,
cmd, args,
load_recipes=True,
require_prefix=True,
)
Requirer.__init__(self)
self.packages = []
if self.args.all:
self.packages = recipe_manager.recipe_manager.list_all()
else:
self.packages = self.inventory.get_packages()
self.assert_requirements()