Fix referenced before assignment in sysvinit module (#42695)
* Fix referenced before assignment in sysvinit module * removed redundant variable initialization
This commit is contained in:
parent
9d5ce3d335
commit
7538a63f70
1 changed files with 2 additions and 2 deletions
|
@ -175,12 +175,12 @@ def main():
|
||||||
|
|
||||||
# figure out started status, everyone does it different!
|
# figure out started status, everyone does it different!
|
||||||
is_started = False
|
is_started = False
|
||||||
|
worked = False
|
||||||
|
|
||||||
# user knows other methods fail and supplied pattern
|
# user knows other methods fail and supplied pattern
|
||||||
if pattern:
|
if pattern:
|
||||||
is_started = get_ps(module, pattern)
|
worked = is_started = get_ps(module, pattern)
|
||||||
else:
|
else:
|
||||||
worked = False
|
|
||||||
if location.get('service'):
|
if location.get('service'):
|
||||||
# standard tool that has been 'destandarized' by reimplementation in other OS/distros
|
# standard tool that has been 'destandarized' by reimplementation in other OS/distros
|
||||||
cmd = '%s %s status' % (location['service'], name)
|
cmd = '%s %s status' % (location['service'], name)
|
||||||
|
|
Loading…
Reference in a new issue