summaryrefslogtreecommitdiff
path: root/licenses/03-cleanup-cc-html-files.py
diff options
context:
space:
mode:
authorFernando Farfan <ffarfan@gmail.com>2015-08-10 14:30:35 -0600
committerFernando Farfan <ffarfan@gmail.com>2015-08-10 15:41:10 -0600
commitacff3ca1094609e01e994fc867d75970ef046940 (patch)
treec94db8b06fc6225795d84108dd1ec9cf5250cc6e /licenses/03-cleanup-cc-html-files.py
parent2d69ab21303ed4dd2604b3d1a9df585cdb25fa19 (diff)
Bump Python version to 3
All our license handling scripts should specify python v.3, so we bump the version for the CreativeCommons scripts. [endlessm/eos-sdk#3471]
Diffstat (limited to 'licenses/03-cleanup-cc-html-files.py')
-rwxr-xr-xlicenses/03-cleanup-cc-html-files.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/licenses/03-cleanup-cc-html-files.py b/licenses/03-cleanup-cc-html-files.py
index dabfb09..80f93cd 100755
--- a/licenses/03-cleanup-cc-html-files.py
+++ b/licenses/03-cleanup-cc-html-files.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
from bs4 import BeautifulSoup, Comment
import os
@@ -12,7 +12,7 @@ def main(argv):
cleanup_legalcode_file('publicdomain/', 'CC0-1.0')
for lang in langs:
cleanup_deed_file('publicdomain/', 'CC0-1.0', lang)
- print ''
+ print('')
# Clean up Creative Commons license files
cc_licenses = [
@@ -34,11 +34,11 @@ def main(argv):
cleanup_legalcode_file('creativecommons/', license)
for lang in langs:
cleanup_deed_file('creativecommons/', license, lang)
- print ''
+ print('')
def cleanup_legalcode_file(src_dir, license):
f_legalcode = os.path.join(src_dir, 'legalcode', license + '-legalcode.html')
- print 'Cleaning up ' + f_legalcode
+ print('Cleaning up ' + f_legalcode)
with open(f_legalcode, 'r+') as f:
html = f.read()
@@ -74,7 +74,7 @@ def cleanup_legalcode_file(src_dir, license):
def cleanup_deed_file(src_dir, license, lang):
f_deed = os.path.join(src_dir, lang, license + '.html')
- print 'Cleaning up ' + f_deed
+ print('Cleaning up ' + f_deed)
with open(f_deed, 'r+') as f:
html = f.read()