[crossfire] Revision: 13336 has broken CFDialog

Kevin Bulgrien kbulgrien at att.net
Sat Jun 5 12:20:44 CDT 2010


> Hello.
> 
> Could you please try with the attached CFDialog.py file?
> Just in case, remove your existing CFDialog.pyc, and restart the server - for 
> some reason, changes to CFDialog.py aren't always taken into account without a 
> server restart, for some reason.
> 
> I changed the "except Exception as error" line back to its original state.
> 
> Thanks
> 
> Nicolas

NOTE:  I had been only looking in the server logfile and saw no problems, but the
server had been started with -detach.  While testing this file, I started the
server in a console.  With the HEAD version of CFDialog.py, after my testing, I
got messages in the console:

$ crossfire-server
Traceback (most recent call last):
  File "/home/apps/crossfire/share/crossfire/maps/python/dialog/npc_dialog.py", line 45, in <module>
    from CFDialog import DialogRule, Dialog, IncludeRule
  File "/home/apps/crossfire/share/crossfire/maps/python/CFDialog.py", line 304
    except Exception as error:
                      ^
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "/home/apps/crossfire/share/crossfire/maps/python/dialog/npc_dialog.py", line 45, in <module>
    from CFDialog import DialogRule, Dialog, IncludeRule
  File "/home/apps/crossfire/share/crossfire/maps/python/CFDialog.py", line 304
    except Exception as error:
                      ^
SyntaxError: invalid syntax

I guess there is a lesson here... that to really test, one needs to be sure to run
the server in a console, or at least redirect stderr somewhere...

> Le vendredi 04 juin 2010 01:02:17, Kevin Bulgrien a écrit :
> > > Hello.
> > > 
> > > > This commit has broken dialogs.  It is no longer possible to get out of
> > > > scorn by saying a password, and it further appears that most CFDialogs
> > > > are now completely disabled...
> > > > 
> > > > Scorn quests, Goths Hintson... etc.  No server messages are issued. 
> > > > The NPCs simply do not respond any more.
> > > > 
> > > > I backed up to 13325 in the python folder and moved forward until it
> > > > re-broke. This is the culprit.
> > > 
> > > Using the latest SVN, all seems to work as expected, but I'm getting the
> > > following warnings in the server logs:
> > > 
> > > <string>:104: DeprecationWarning: dict.has_key() not supported in 3.x;
> > > use the in operator
> > > (...)share/crossfire/maps/python/CFDialog.py:215: DeprecationWarning:
> > > dict.has_key() not supported in 3.x; use the in operator
> > > 
> > >   if Crossfire.GetPrivateDictionary().has_key(key):
> > > What Python version are you using? Would it be 3.x by any chance? ;)
> > 
> > $ python --version
> > Python 2.5.2
> > 
> > $ rpm -qa | grep python | grep 3
> > gnome-python-bonobo-2.22.3-1mdv2009.0
> > python-rhpl-0.212-3mdv2009.0
> > python-reportlab-2.1-3mdv2009.0
> > python-celementtree-1.0.5-2.3mdv2009.0
> > gnome-python-2.22.3-1mdv2009.0
> > python-dbus-0.83.0-1mdv2009.0
> > python-qt-3.17.4-1mdv2009.0
> > python-notify-0.1.1-3mdv2009.0
> > python-configobj-4.5.3-1mdv2009.0
> > gnome-python-canvas-2.22.3-1mdv2009.0
> > python-zope-interface-3.4.1-1mdv2009.0
> > 
> > $ svn status server maps
> > ?      server/trunk/svn-commit.tmp
> > ?      server/trunk/plugins/cf_darcap/Makefile.in
> > ?      server/trunk/plugins/cf_darcap/Makefile
> > ?      server/trunk/plugins/citylife/include/Makefile.in
> > ?      server/trunk/plugins/citylife/include/Makefile
> > ?      server/trunk/plugins/cfrhg/include/Makefile.in
> > ?      server/trunk/plugins/cfrhg/include/Makefile
> > M      server/trunk/include/autoconf.h.in
> > ?      server/trunk/utils/crossfire-mapper
> > ?      server/trunk/utils/cre/gmon.out
> > ?      server/trunk/utils/cre/cre.gch
> > ?      server/branches/1.x
> > ?      maps/trunk/pup_land/lone_town.invidious
> > ?      maps/trunk/pup_land/guilds/purple_butterfly.invidious
> > ?      maps/trunk/unlinked/kbulgrien/kbulgrien
> > 
> > I am also at top of SVN.
> > 
> > Kevin
> > 
> > _______________________________________________
> > crossfire mailing list
> > crossfire at metalforge.org
> > http://mailman.metalforge.org/mailman/listinfo/crossfire
> 
> -- 
> Mon p'tit coin du web - http://nicolas.weeger.org



More information about the crossfire mailing list