Skip to content

Commit

Permalink
much more readable codec spec debug string
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@5306 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Jan 29, 2014
1 parent d9f4c5e commit 5aa7471
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/xpra/codecs/codec_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,14 @@ def __repr__(self):

def info(self):
try:
return "%s.%s" % ((self.codec_type.__module__ or self.codec_class), self.codec_class.__name__)
s = str(self.codec_class)
#regexp it?
p = s.find("xpra.codecs.")
if p>=0:
s = s[p+len("xpra.codecs."):]
p = s.find(".encoder.Encoder")
if p>0:
s = s[:p]
return "%s:%s" % (self.codec_type, s)
except:
return "%s" % (self.codec_type or self.codec_class)

0 comments on commit 5aa7471

Please sign in to comment.