From fe87145aa8392650a2884c2e9507ca34086e2157 Mon Sep 17 00:00:00 2001 From: Prodesire Date: Sat, 23 Dec 2017 11:16:43 +0800 Subject: [PATCH] return self on cmd.chcp.__enter__ --- pydu/cmd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pydu/cmd.py b/pydu/cmd.py index 1409cda..5c6e2da 100644 --- a/pydu/cmd.py +++ b/pydu/cmd.py @@ -141,7 +141,7 @@ if WINDOWS: windll.kernel32.SetConsoleOutputCP(code) def __enter__(self): - pass + return self def __exit__(self, exc_type, exc_val, exc_tb): windll.kernel32.SetConsoleOutputCP(self.origin_code)