Fix main.py
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
import os
|
||||
import sys
|
||||
|
||||
from cement.core import foundation
|
||||
from cement.core.foundation import CementApp
|
||||
from cement.core.exc import CaughtSignal, FrameworkError
|
||||
from cement.ext.ext_argparse import ArgParseArgumentHandler
|
||||
from cement.utils.misc import init_defaults
|
||||
@@ -40,7 +40,7 @@ class WOArgHandler(ArgParseArgumentHandler):
|
||||
super(WOArgHandler, self).error("unknown args")
|
||||
|
||||
|
||||
class WOApp(foundation.CementApp):
|
||||
class WOApp(CementApp):
|
||||
class Meta:
|
||||
label = 'wo'
|
||||
|
||||
@@ -79,9 +79,10 @@ class WOTestApp(WOApp):
|
||||
|
||||
# Define the applicaiton object outside of main, as some libraries might wish
|
||||
# to import it as a global (rather than passing it into another class/func)
|
||||
app = WOApp()
|
||||
|
||||
|
||||
def main():
|
||||
with WOApp() as app:
|
||||
try:
|
||||
global sys
|
||||
# Default our exit status to 0 (non-error)
|
||||
|
||||
Reference in New Issue
Block a user