/usr/lib/python2.7/dist-packages/framework/subsystems/opimd/helpers.py is in fso-frameworkd 0.10.1-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Open PIM Daemon
(C) 2008 by Soeren Apel <abraxa@dar-clan.de>
(C) 2009 Michael 'Mickey' Lauer <mlauer@vanille-media.de>
(C) 2008-2009 Openmoko, Inc.
(C) 2009 Sebastian Krzyszkowiak <seba.dos1@gmail.com>
GPLv2 or later
Helpers
"""
from dbus import DBusException, Array
#----------------------------------------------------------------------------#
def field_value_to_list(field_value):
#----------------------------------------------------------------------------#
if isinstance(field_value, (list, Array)):
return field_value
else:
return [ field_value ]
#----------------------------------------------------------------------------#
class InvalidDomain( DBusException ):
#----------------------------------------------------------------------------#
"""Raised when a domain is invalid"""
_dbus_error_name = "org.freesmartphone.PIM.InvalidDomain"
#----------------------------------------------------------------------------#
class InvalidField( DBusException ):
#----------------------------------------------------------------------------#
"""Raised when a field name or type is invalid"""
_dbus_error_name = "org.freesmartphone.PIM.InvalidField"
#----------------------------------------------------------------------------#
class InvalidQueryID( DBusException ):
#----------------------------------------------------------------------------#
"""Raised when a submitted query ID is invalid / out of range"""
_dbus_error_name = "org.freesmartphone.PIM.InvalidQueryID"
#----------------------------------------------------------------------------#
class AmbiguousKey( DBusException ):
#----------------------------------------------------------------------------#
"""Raised when a given message field name is present more than once and it's unclear which to modify"""
_dbus_error_name = "org.freesmartphone.PIM.AmbiguousKey"
#----------------------------------------------------------------------------#
class InvalidEntryID( DBusException ):
#----------------------------------------------------------------------------#
"""Raised when a submitted entry ID is invalid / out of range"""
_dbus_error_name = "org.freesmartphone.PIM.InvalidEntryID"
#----------------------------------------------------------------------------#
class NoMoreEntries( DBusException ):
#----------------------------------------------------------------------------#
"""Raised when there are no more entries to be listed"""
_dbus_error_name = "org.freesmartphone.PIM.NoMoreEntries"
#----------------------------------------------------------------------------#
class InvalidData( DBusException ):
#----------------------------------------------------------------------------#
"""Raised when data passed to method are not valid"""
_dbus_error_name = "org.freesmartphone.PIM.InvalidData"
#----------------------------------------------------------------------------#
class QueryFailed( DBusException ):
#----------------------------------------------------------------------------#
"""Raised when can't query for some reason"""
_dbus_error_name = "org.freesmartphone.PIM.QueryFailed"
|