8000 Convert to Python 3, refactor and apply PEP 8 · EONRaider/violent-python3@9c8a198 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9c8a198

Browse files
committed
Convert to Python 3, refactor and apply PEP 8
* Optimized imports * Check notes on README.md under the "Refactoring" section
1 parent 70d1596 commit 9c8a198

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed
Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
1-
#!/usr/bin/python
2-
# -*- coding: utf-8 -*-
3-
41
import obexftp
52

63
try:
74
btPrinter = obexftp.client(obexftp.BLUETOOTH)
85
btPrinter.connect('00:16:38:DE:AD:11', 2)
96
btPrinter.put_file('/tmp/ninja.jpg')
10-
print '[+] Printed Ninja Image.'
11-
except:
7+
print('[+] Printed Ninja Image.')
128

13-
print '[-] Failed to print Ninja Image.'
9+
except:
10+
print('[-] Failed to print Ninja Image.')

0 commit comments

Comments
 (0)
0