** Description changed:

  The str() method in SourceEntry class, has malforms the source line.
  
  Console out:
  
- Python 2.7.3 (default, Apr 10 2013, 06:20:15) 
+ Python 2.7.3 (default, Apr 10 2013, 06:20:15)
  [GCC 4.6.3] on linux2
  Type "help", "copyright", "credits" or "license" for more information.
  >>> from aptsources.sourceslist import SourceEntry
  >>> s = SourceEntry('deb [arch=amd64 trusted=yes] 
http://ppa.launchpad.net/xubuntu-dev/xfce-4.10/ubuntu precise main')
  >>> s.str()
  'deb [arch=amd64] trusted=yes] 
http://ppa.launchpad.net/xubuntu-dev/xfce-4.10/ubuntu precise main\n'
  
  Note the extra "]". This leads to apt-add-repository to malform some
  entries.
+ 
+ Edit:
+ 
+ The parsing itself is wrong.
+ 
+ Python 2.7.3 (default, Apr 10 2013, 06:20:15) 
+ [GCC 4.6.3] on linux2
+ Type "help", "copyright", "credits" or "license" for more information.
+ >>> from aptsources.sourceslist import SourceEntry
+ >>> s = SourceEntry('deb [arch=amd64 trusted=yes] 
http://ppa.launchpad.net/xubuntu-dev/xfce-4.10/ubuntu precise main')
+ >>> s.architectures
+ ['amd64']
+ >>> s.uri
+ 'trusted=yes]'
+ >>> s.dist
+ 'http://ppa.launchpad.net/xubuntu-dev/xfce-4.10/ubuntu'
+ >>> s.comps
+ ['precise', 'main']

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1242778

Title:
  python-apt malforms source lines with multiple options

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python-apt/+bug/1242778/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to