PEP 8 + minor changes

This commit is contained in:
Jonathan Lestrelin 2017-08-20 14:49:50 +02:00
parent c3593ddd19
commit 0dc048d5c7
2 changed files with 15 additions and 10 deletions

4
.coafile Normal file
View File

@ -0,0 +1,4 @@
[python]
bears = PyUnusedCodeBear,PySafetyBear,PyFlakesBear,PEP8Bear,BanditBear,PyCommentedCodeBear,VultureBear,InvalidLinkBear,PyImportSortBear
files = *.py
use_spaces = true

View File

@ -25,16 +25,16 @@
# Copyright (C) 2012 Red Hat, Inc. # Copyright (C) 2012 Red Hat, Inc.
# Author: Luke Macken <lmacken@redhat.com> # Author: Luke Macken <lmacken@redhat.com>
import subprocess from os import getenv
import re from os import walk
from os import walk, getenv
from os.path import expanduser from os.path import expanduser
import re
from gi.repository import GLib import subprocess
import dbus import dbus
import dbus.glib import dbus.glib
import dbus.service import dbus.service
from gi.repository import GLib
# Convenience shorthand for declaring dbus interface methods. # Convenience shorthand for declaring dbus interface methods.
# s.b.n. -> search_bus_name # s.b.n. -> search_bus_name
@ -113,10 +113,11 @@ class SearchPassService(dbus.service.Object):
except dbus.DBusException: except dbus.DBusException:
subprocess.run(['pass', 'show', '-c', name]) subprocess.run(['pass', 'show', '-c', name])
def main(): def main():
service = SearchPassService() SearchPassService()
loop = GLib.MainLoop() GLib.MainLoop().run()
loop.run()
if __name__ == '__main__': if __name__ == '__main__':
main() main()