PEPify testmodule.py
This commit is contained in:
parent
b988c3ad72
commit
637242776c
@ -25,24 +25,25 @@ import yaml
|
|||||||
try:
|
try:
|
||||||
import libcalamares
|
import libcalamares
|
||||||
except ImportError:
|
except ImportError:
|
||||||
print( "Failed to import libcalamares. Make sure then PYTHONPATH environment variable includes the dir where libcalamares.so is installed." )
|
print("Failed to import libcalamares. Make sure then PYTHONPATH "
|
||||||
|
"environment variable includes the dir where libcalamares.so is "
|
||||||
|
"installed.")
|
||||||
print()
|
print()
|
||||||
raise
|
raise
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class Job:
|
class Job:
|
||||||
def __init__( self, workingPath, doc ):
|
|
||||||
|
def __init__(self, working_path, doc):
|
||||||
self.module_name = doc["name"]
|
self.module_name = doc["name"]
|
||||||
self.pretty_name = "Testing job " + doc["name"]
|
self.pretty_name = "Testing job " + doc["name"]
|
||||||
self.working_path = workingPath
|
self.working_path = working_path
|
||||||
self.configuration = doc["configuration"]
|
self.configuration = doc["configuration"]
|
||||||
|
|
||||||
def setprogress(self, progress):
|
def setprogress(self, progress):
|
||||||
print("Job set progress to {}%.".format(progress * 100))
|
print("Job set progress to {}%.".format(progress * 100))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
parser = argparse.ArgumentParser()
|
parser = argparse.ArgumentParser()
|
||||||
parser.add_argument("moduledir",
|
parser.add_argument("moduledir",
|
||||||
|
Loading…
Reference in New Issue
Block a user