+ def __repr__(self):
+ return 'Range({0})'.format(self.tpl)
+
+ def _check(self):
+ if not isinstance(self.tpl, tuple):
+ raise CommandError('Wrong type, provide a tuple')
+ if len(self.tpl) not in [1, 2]:
+ raise CommandError('length not in [1, 2]')
+ for index in self.tpl:
+ try:
+ index = int(index)
+ except (TypeError, ValueError):
+ raise CommandError('Not a tuple of int')
+
+
+class _NotConnected: