Merge remote-tracking branch 'rzhxeo/youporn-hd'
authorPhilipp Hagemeister <phihag@phihag.de>
Wed, 28 Aug 2013 16:22:28 +0000 (18:22 +0200)
committerPhilipp Hagemeister <phihag@phihag.de>
Wed, 28 Aug 2013 16:22:28 +0000 (18:22 +0200)
Conflicts:
youtube_dl/utils.py

1  2 
youtube_dl/utils.py

index 64ab3091070013f840e44bf6c29a808fa75c47d1,ee8df6a5b844054287d1e6a78668e23746058abd..b3d0f64ea9162876f5cd3d517ef77a9b631c781e
@@@ -735,11 -710,18 +735,29 @@@ class DateRange(object)
          return '%s - %s' % ( self.start.isoformat(), self.end.isoformat())
  
  
 +def platform_name():
 +    """ Returns the platform name as a compat_str """
 +    res = platform.platform()
 +    if isinstance(res, bytes):
 +        res = res.decode(preferredencoding())
 +
 +    assert isinstance(res, compat_str)
 +    return res
++
++
+ def bytes_to_intlist(bs):
+     if not bs:
+         return []
+     if isinstance(bs[0], int):  # Python 3
+         return list(bs)
+     else:
+         return [ord(c) for c in bs]
++
+ def intlist_to_bytes(xs):
+     if not xs:
+         return b''
+     if isinstance(chr(0), bytes):  # Python 2
+         return ''.join([chr(x) for x in xs])
+     else:
+         return bytes(xs)