diff --git a/.coveragerc b/.coveragerc index 2301243..cdc54b3 100644 --- a/.coveragerc +++ b/.coveragerc @@ -1,3 +1,4 @@ [report] omit = */tests/* + */external/* diff --git a/elodie/plist_parser.py b/elodie/plist_parser.py deleted file mode 100644 index ba8699b..0000000 --- a/elodie/plist_parser.py +++ /dev/null @@ -1,44 +0,0 @@ -""" -Parse OS X plists. - -.. moduleauthor:: Jaisen Mathai -""" - -# load modules -from os import path - -import plistlib - - -class Plist(object): - - """Parse and interact with a plist file. - - This class wraps the `plistlib module`_ from the standard library. - - .. _plistlib module: https://docs.python.org/3/library/plistlib.html - - :param str source: Source to read the plist from. - """ - - def __init__(self, source): - if not path.isfile(source): - raise IOError('Could not load plist file %s' % source) - self.source = source - self.plist = plistlib.readPlist(self.source) - - def update_key(self, key, value): - """Update a value in the plist. - - :param str key: Key to modify. - :param value: New value. - """ - self.plist[key] = value - - def write_file(self, destination): - """Save the plist. - - :param destination: Write the plist here. - :type destination: str or file object - """ - plistlib.writePlist(self.plist, destination)