Commit 298581c9d83a04ea0a5f61782ea8565eca71a437
1 parent
4ade7517
Exists in
master
and in
1 other branch
Importing missing modules
Showing
1 changed file
with
5 additions
and
3 deletions
Show diff stats
src/data.py
... | ... | @@ -30,6 +30,8 @@ import shutil |
30 | 30 | import apt |
31 | 31 | import re |
32 | 32 | import operator |
33 | +import urllib | |
34 | +import simplejson as json | |
33 | 35 | |
34 | 36 | from error import Error |
35 | 37 | from singleton import Singleton |
... | ... | @@ -208,8 +210,8 @@ class DebianPackage(): |
208 | 210 | self.provides = pkg_version.record['Provides'] |
209 | 211 | |
210 | 212 | def load_details_from_dde(self,dde_server,dde_port): |
211 | - json_data = json.load(urllib.urlopen("http://%s:%s/q/udd/packages/all/%s?t=json" | |
212 | - % dde_server,dde_port,self.name)) | |
213 | + json_data = json.load(urllib.urlopen("http://%s:%d/q/udd/packages/all/%s?t=json" | |
214 | + % (dde_server,dde_port,self.name))) | |
213 | 215 | |
214 | 216 | self.maintainer = json_data['r']['maintainer'] |
215 | 217 | self.version = json_data['r']['version'] |
... | ... | @@ -237,7 +239,7 @@ class DebianPackage(): |
237 | 239 | self.popcon_insts = json_data['r']['popcon']['insts'] |
238 | 240 | |
239 | 241 | def format_description(self,description): |
240 | - return description.replace('.\n','').replace('\n','<br />') | |
242 | + return description.replace(' .\n','<br />').replace('\n','<br />') | |
241 | 243 | |
242 | 244 | def debtags_str_to_dict(self, debtags_str): |
243 | 245 | debtags_list = [tag.rstrip(",") for tag in debtags_str.split()] | ... | ... |