ofono template: cannot add second modem

Bug #1340590 reported by Jonas G. Drange
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-dbusmock (Ubuntu)
Fix Released
Undecided
Martin Pitt

Bug Description

When trying to add a second modem to a ofono mock (using the template), it fails.

Minimal test case:
http://pastebin.ubuntu.com/7779081/

Ouput:
http://pastebin.ubuntu.com/7779083/

The exception is:
    DBusException: org.freedesktop.DBus.Python.dbus.exceptions.DBusException: ('org.freedesktop.DBus.Mock.NameError', 'object /ril_0/operator/op1 already exists')

Which comes from AddModem calling add_netreg_api, which tries to add an object like so:
    mock.AddObject('/%s/operator/op1' % _parameters.get('ModemName', 'ril_0'),

_parameters seems to be unchangeable from the test case, or, most likely, I am using this code wrong.

ProblemType: Bug
DistroRelease: Ubuntu 14.10
Package: python3-dbusmock (not installed)
ProcVersionSignature: Ubuntu 3.15.0-6.11-generic 3.15.0
Uname: Linux 3.15.0-6-generic x86_64
ApportVersion: 2.14.4-0ubuntu1
Architecture: amd64
CurrentDesktop: Unity
Date: Fri Jul 11 10:02:08 2014
DistributionChannelDescriptor:
 # This is a distribution channel descriptor
 # For more information see http://wiki.ubuntu.com/DistributionChannelDescriptor
 canonical-oem-somerville-precise-amd64-20120703-2
EcryptfsInUse: Yes
InstallationDate: Installed on 2013-08-27 (317 days ago)
InstallationMedia: Ubuntu 12.04 "Precise" - Build amd64 LIVE Binary 20120703-15:08
SourcePackage: python-dbusmock
UpgradeStatus: Upgraded to utopic on 2014-07-01 (9 days ago)

Revision history for this message
Jonas G. Drange (jonas-drange) wrote :
Revision history for this message
Martin Pitt (pitti) wrote :
Changed in python-dbusmock (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-dbusmock - 0.10.3-1

---------------
python-dbusmock (0.10.3-1) unstable; urgency=medium

  * New upstream release:
    - Fix TestCLI.test_template_system test with upower 0.99. (LP: #1330037)
    - ofono template: Support adding a second modem with AddModem().
      (LP: #1340590)

 -- Martin Pitt <email address hidden> Wed, 16 Jul 2014 13:32:03 +0200

Changed in python-dbusmock (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.