Browse Source

Use correct integer division

Without this, we get the following on Python 3:

    return '%s%*s' % (markup_fn(text), pad_len, '')
    TypeError: * wants int
Steven Myint 10 years ago
parent
commit
18b3b85be7
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      cdiff.py

+ 1
- 1
cdiff.py View File

508
                 # [terminal size minus the line number columns and 3 separating
508
                 # [terminal size minus the line number columns and 3 separating
509
                 # spaces
509
                 # spaces
510
                 #
510
                 #
511
-                width = (terminal_size()[0] - num_width * 2 - 3) / 2
511
+                width = (terminal_size()[0] - num_width * 2 - 3) // 2
512
             except Exception:
512
             except Exception:
513
                 # If terminal detection failed, set back to default
513
                 # If terminal detection failed, set back to default
514
                 width = 80
514
                 width = 80