From b5ae02513ad75f7956a7565fd09a99a4dc92f11c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Sun, 24 Nov 2019 18:10:17 +0200 Subject: [PATCH] fix deg.py --- misc/deg.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/deg.py b/misc/deg.py index d678a7b..7b2f9a2 100644 --- a/misc/deg.py +++ b/misc/deg.py @@ -10,8 +10,8 @@ def guess(inp): if isinstance(inp, Dec): return inp - if '-' in instr: - deg, mm, ss = instr.split('-') + if isinstance(inp, str) and '-' in inp: + deg, mm, ss = inp.split('-') ddeg, dmm, dss = Dec(deg), Dec(mm), Dec(ss) return deg + dmm/60 + dss/3600 else: