"""
-__version__ = "0.1.0"
+__version__ = "0.1.1"
from .mediator import AbstractMediator
from .overlay import OverlayFile
# merge with user and password settings
if user:
logger.info( "configuring ppp for user '%s' w/ password '%s'" % ( user, password ) )
- self.ppp_options += [ "user", '"%s"' % user ]
+ self.ppp_options += [ "user", user ]
self.pds[self.__class__.PPP_PAP_SECRETS_FILENAME] = '%s * "%s" *\n' % ( user or '*', password )
self.pds[self.__class__.PPP_CHAP_SECRETS_FILENAME] = '%s * "%s" *\n'% ( user or '*', password )
@tasklet.tasklet
def _enable( self ):
- print "Enabled %s" % self.name
yield None
@tasklet.tasklet
def _disable( self ):
- print "Disabled %s" % self.name
yield None
#----------------------------------------------------------------------------#
proxy = self.bus.get_object( "org.freesmartphone.odeviced", "/org/freesmartphone/Device/PowerControl/" + self.name )
iface = dbus.Interface( proxy, "org.freesmartphone.Device.PowerControl" )
yield tasklet.WaitDBus( iface.SetPower, True)
- print "Enabled %s" % self.name
@tasklet.tasklet
def _disable( self ):
proxy = self.bus.get_object( "org.freesmartphone.odeviced", "/org/freesmartphone/Device/PowerControl/" + self.name )
iface = dbus.Interface( proxy, "org.freesmartphone.Device.PowerControl" )
yield tasklet.WaitDBus( iface.SetPower, False )
- print "Disabled %s" % self.name
#----------------------------------------------------------------------------#
class OGPSDResource( AbstractResource ):
proxy = self.bus.get_object( "org.freesmartphone.ogpsd", "/org/freedesktop/Gypsy" )
iface = dbus.Interface( proxy, "org.freesmartphone.GPS" )
yield tasklet.WaitDBus( iface.SetPower, True )
- print "Enabled %s" % self.name
@tasklet.tasklet
def _disable( self ):
proxy = self.bus.get_object( "org.freesmartphone.ogpsd", "/org/freedesktop/Gypsy" )
iface = dbus.Interface( proxy, "org.freesmartphone.GPS" )
yield tasklet.WaitDBus( iface.SetPower, False )
- print "Disabled %s" % self.name
-
#----------------------------------------------------------------------------#
class ClientResource( AbstractResource ):