update Sat Sep 12 12:37:01 PDT 2009
[pkgsrc.git] / wip / bleachbit / patches / patch-ae
1 $NetBSD$
2
3 --- ./bleachbit/Update.py.orig  2009-08-27 13:03:52.000000000 +0000
4 +++ ./bleachbit/Update.py       2009-08-29 00:57:44.000000000 +0000
5 @@ -2,7 +2,7 @@
6  
7  ## BleachBit
8  ## Copyright (C) 2009 Andrew Ziem
9 -## http://bleachbit.sourceforge.net
10 +## http://bleachbit-project.appspot.com
11  ##
12  ## This program is free software: you can redistribute it and/or modify
13  ## it under the terms of the GNU General Public License as published by
14 @@ -33,11 +33,16 @@
15  
16  def user_agent():
17      """Return the user agent string"""
18 -    __platform = platform.system() # Linux or Windows
19 +    __platform = platform.system() # Linux or Windows or NetBSD
20      __os = platform.uname()[2] # e.g., 2.6.28-12-generic or XP
21      if sys.platform == "win32":
22          # Python 2.5.4 shows uname()[2) as Vista on Windows 7
23          __os = platform.uname()[3][0:3] # 5.1 = Windows XP, 6.0 = Vista, 6.1 = 7
24 +    if sys.platform >= 'netbsd5':
25 +        sys = platform.system()
26 +        mach = platform.machine()
27 +        rel = platform.release()
28 +        __os = sys + '/' + mach+ ' '  + rel
29      if sys.platform == 'linux2':
30          dist = platform.dist()
31          __os = dist[0] + '/' + dist[1] + '-' + dist[2]
32 @@ -114,4 +119,3 @@
33  
34  if __name__ == '__main__':
35      unittest.main()
36 -