Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _main(self):
"""
gets called automatically from Memacs class.
read the lines from phonecalls backup xml file,
parse and write them to org file
"""
data = CommonReader.get_data_from_file(self._args.smsxmlfile)
try:
xml.sax.parseString(data.encode('utf-8'),
PhonecallsSaxHandler(self._writer,
self._args.ignore_incoming,
self._args.ignore_outgoing,
self._args.ignore_missed,
self._args.ignore_voicemail,
self._args.ignore_rejected,
self._args.ignore_refused,
self._args.minimum_duration or 0,
))
except SAXParseException:
logging.error("No correct XML given")
sys.exit(1)
def _main(self):
"""
gets called automatically from Memacs class.
read the lines from phonecalls backup xml file,
parse and write them to org file
"""
data = CommonReader.get_data_from_file(self._args.smsxmlfile)
try:
xml.sax.parseString(data.encode('utf-8'),
PhonecallsSaxHandler(self._writer,
self._args.ignore_incoming,
self._args.ignore_outgoing,
self._args.ignore_missed,
self._args.ignore_cancelled,
self._args.minimum_duration or 0,
))
except SAXParseException:
logging.error("No correct XML given")
sys.exit(1)