mirror of
https://github.com/b-ryan/powerline-shell.git
synced 2026-09-10 07:26:28 -04:00
Fix py3 ImportError by using relative import
This commit is contained in:
parent
6bef8fab1d
commit
1f1acb81cb
|
|
@ -1,6 +1,4 @@
|
|||
#! /usr/bin/env python
|
||||
|
||||
from colortrans import *
|
||||
from colorsys import hls_to_rgb, rgb_to_hls
|
||||
# md5 deprecated since Python 2.5
|
||||
try:
|
||||
|
|
@ -9,6 +7,9 @@ except ImportError:
|
|||
from hashlib import md5
|
||||
from sys import argv
|
||||
|
||||
# Original, non-relative import errors on Python3
|
||||
from .colortrans import *
|
||||
|
||||
|
||||
def getOppositeColor(r,g,b):
|
||||
hls = rgb_to_hls(r,g,b)
|
||||
|
|
|
|||
Loading…
Reference in a new issue