File: remove_checks_for_copyright_files

package info (click to toggle)
pysolfc 2.0-4
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 19,212 kB
  • ctags: 10,328
  • sloc: python: 61,014; tcl: 4,529; makefile: 54; sh: 17
file content (85 lines) | stat: -rw-r--r-- 3,552 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
Description: Remove checks for individual cardsets' COPYRIGHT files
 which we remove in order to comply with Debian policy.
Author: Bernhard Reiter <ockham@raz.or.at>
Forwarded: not-needed

Index: pysolfc/pysollib/app.py
===================================================================
--- pysolfc.orig/pysollib/app.py	2011-12-13 23:11:09.611745235 +0100
+++ pysolfc/pysollib/app.py	2011-12-13 23:19:33.306242924 +0100
@@ -1394,11 +1394,10 @@
                     if not name.startswith('cardset-'): continue
                     d = os.path.join(dir, name)
                     if not os.path.isdir(d): continue
-                    f1 = os.path.join(d, "config.txt")
-                    f2 = os.path.join(d, "COPYRIGHT")
-                    if os.path.isfile(f1) and os.path.isfile(f2):
+                    f = os.path.join(d, "config.txt")
+                    if os.path.isfile(f):
                         try:
-                            cs = self._readCardsetConfig(d, f1)
+                            cs = self._readCardsetConfig(d, f)
                             if cs:
                                 ##from pprint import pprint
                                 ##print cs.name
@@ -1412,7 +1411,7 @@
                                     #print '+', cs.name
                             else:
                                 print_err('fail _readCardsetConfig: %s %s'
-                                          % (d, f1))
+                                          % (d, f))
                                 pass
                         except Exception, err:
                             ##traceback.print_exc()
Index: pysolfc/pysollib/tile/selectcardset.py
===================================================================
--- pysolfc.orig/pysollib/tile/selectcardset.py	2011-12-13 23:11:09.619745274 +0100
+++ pysolfc/pysollib/tile/selectcardset.py	2011-12-13 23:19:33.306242924 +0100
@@ -357,15 +357,12 @@
         frame.columnconfigure(0, weight=1)
         frame.rowconfigure(1, weight=1)
         #
-        text = ''
-        f = os.path.join(cardset.dir, "COPYRIGHT")
-        try:
-            text = open(f).read()
-        except:
-            pass
-        if text:
-            text_w.config(state="normal")
-            text_w.insert("insert", text)
+        text = '''\
+Copyright and license information for all cardsets and
+other game components can be found in the file
+/usr/share/doc/pysolfc/copyright
+'''
+        text_w.insert("insert", text)
         text_w.config(state="disabled")
         #
         focus = self.createButtons(bottom_frame, kw)
Index: pysolfc/pysollib/tk/selectcardset.py
===================================================================
--- pysolfc.orig/pysollib/tk/selectcardset.py	2011-12-13 23:19:45.874305245 +0100
+++ pysolfc/pysollib/tk/selectcardset.py	2011-12-13 23:23:03.583285630 +0100
@@ -357,15 +357,12 @@
         frame.columnconfigure(0, weight=1)
         frame.rowconfigure(1, weight=1)
         #
-        text = ''
-        f = os.path.join(cardset.dir, "COPYRIGHT")
-        try:
-            text = open(f).read()
-        except:
-            pass
-        if text:
-            text_w.config(state="normal")
-            text_w.insert("insert", text)
+        text = '''
+Copyright and license information for all cardsets and
+other game components can be found in the file
+/usr/share/doc/pysolfc/copyright
+'''
+        text_w.insert("insert", text)
         text_w.config(state="disabled")
         #
         focus = self.createButtons(bottom_frame, kw)