# HG changeset patch # User souliane # Date 1398617617 -7200 # Node ID 8ecc5a7062e4d158f3d33d6cebe6b0535a5e1985 # Parent 4fcf9bac109c59b4e76c06086658019b230259f4 browser and server sides: fixes module import + use enumerate instead of xrange diff -r 4fcf9bac109c -r 8ecc5a7062e4 browser_side/base_widget.py --- a/browser_side/base_widget.py Mon Apr 07 23:31:21 2014 +0200 +++ b/browser_side/base_widget.py Sun Apr 27 18:53:37 2014 +0200 @@ -38,7 +38,7 @@ from pyjamas import Window from __pyjamas__ import doc -import dialog +from browser_side import dialog class DragLabel(DragWidget): diff -r 4fcf9bac109c -r 8ecc5a7062e4 browser_side/contact_group.py --- a/browser_side/contact_group.py Mon Apr 07 23:31:21 2014 +0200 +++ b/browser_side/contact_group.py Sun Apr 27 18:53:37 2014 +0200 @@ -27,8 +27,8 @@ from pyjamas.ui import HasAlignment from browser_side.dialog import ConfirmDialog, InfoDialog from list_manager import ListManager -import dialog -import contact +from browser_side import dialog +from browser_side import contact class ContactGroupManager(ListManager): diff -r 4fcf9bac109c -r 8ecc5a7062e4 browser_side/menu.py --- a/browser_side/menu.py Mon Apr 07 23:31:21 2014 +0200 +++ b/browser_side/menu.py Sun Apr 27 18:53:37 2014 +0200 @@ -31,8 +31,8 @@ from html_tools import html_sanitize from file_tools import FileUploadPanel from xmlui import XMLUI -import panels -import dialog +from browser_side import panels +from browser_side import dialog from contact_group import ContactGroupEditor import re from sat.core.i18n import _ diff -r 4fcf9bac109c -r 8ecc5a7062e4 browser_side/panels.py --- a/browser_side/panels.py Mon Apr 07 23:31:21 2014 +0200 +++ b/browser_side/panels.py Sun Apr 27 18:53:37 2014 +0200 @@ -48,10 +48,10 @@ from card_game import CardPanel from radiocol import RadioColPanel from menu import Menu -import dialog -import base_widget -import richtext -import contact +from browser_side import dialog +from browser_side import base_widget +from browser_side import richtext +from browser_side import contact from constants import Const from plugin_xep_0085 import ChatStateMachine diff -r 4fcf9bac109c -r 8ecc5a7062e4 browser_side/richtext.py --- a/browser_side/richtext.py Mon Apr 07 23:31:21 2014 +0200 +++ b/browser_side/richtext.py Sun Apr 27 18:53:37 2014 +0200 @@ -34,7 +34,7 @@ from base_panels import TitlePanel, BaseTextEditor, HTMLTextEditor from list_manager import ListManager from html_tools import html_sanitize -import panels +from browser_side import panels from sat_frontends.tools import composition from sat.core.i18n import _ diff -r 4fcf9bac109c -r 8ecc5a7062e4 twisted/plugins/libervia.py --- a/twisted/plugins/libervia.py Mon Apr 07 23:31:21 2014 +0200 +++ b/twisted/plugins/libervia.py Sun Apr 27 18:53:37 2014 +0200 @@ -50,11 +50,12 @@ """ config = SafeConfigParser() config.read(Const.CONFIG_FILES) - for index in xrange(0, len(self.optParameters)): - name = self.optParameters[index][0] + for index, param in list(enumerate(self.optParameters)): + # index is only used to not modify the loop variable "param" + name = param[0] try: value = config.get('libervia', name) - self.optParameters[index][2] = self.optParameters[index][4](value) + self.optParameters[index][2] = param[4](value) except (NoSectionError, NoOptionError): pass usage.Options.__init__(self)