#1 handle meeting names with unicode in the name
Opened 6 years ago by kevin. Modified 4 years ago
kevin/supybot-meetbot force-meetingname  into  master

file modified
+5 -3
@@ -34,6 +34,8 @@ 

  import re

  import stat

  

+ from kitchen.text.converters import to_bytes

+ 

  import writers

  import items

  reload(writers)
@@ -148,8 +150,8 @@ 

              meetingname = self.M._meetingname.replace('/', '')

          else:

              meetingname = channel

-         path = pattern%locals()

-         path = time.strftime(path, self.M.starttime)

+         path = pattern % locals()

+         path = time.strftime(to_bytes(path), self.M.starttime)

          # If we want the URL name, append URL prefix and return

          if url:

              return os.path.join(self.logUrlPrefix, path)
@@ -408,7 +410,7 @@ 

          commands = [ "#"+x[3:] for x in dir(self) if x[:3]=="do_" ]

          commands.sort()

          self.reply("Available commands: "+(" ".join(commands)))

-             

+ 

  

  

  class Meeting(MeetingCommands, object):

Without this such meetings cause a crash and anoying recovery.

Note that this adds a dependency on kitchen.

Do you have any idea of what the type is before?

Not adding the dependency on kitchen would be nice since we're kinda trying to not keep it around for the long term.

No idea. Is there some way to tell?

Debugging we could add, etc?

Metadata