about summary refs log tree commit diff stats
path: root/miasm2/core/interval.py
diff options
context:
space:
mode:
authorFabrice Desclaux <fabrice.desclaux@cea.fr>2015-04-01 15:10:35 +0200
committerFabrice Desclaux <fabrice.desclaux@cea.fr>2015-04-01 23:47:37 +0200
commit5a6145c5ea3a1df1e666224962dc3ba685327a12 (patch)
tree97c06f8451758e7f84431ba59fc9ff4d5aca1f11 /miasm2/core/interval.py
parent8e9957cba631f1c3640b18af30f129d88e9b3912 (diff)
downloadmiasm-5a6145c5ea3a1df1e666224962dc3ba685327a12.tar.gz
miasm-5a6145c5ea3a1df1e666224962dc3ba685327a12.zip
interval: add empty property
Diffstat (limited to 'miasm2/core/interval.py')
-rw-r--r--miasm2/core/interval.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/miasm2/core/interval.py b/miasm2/core/interval.py
index d76cbd15..1f6eb739 100644
--- a/miasm2/core/interval.py
+++ b/miasm2/core/interval.py
@@ -215,6 +215,12 @@ class interval(object):
             return None, None
         return self.intervals[0][0], self.intervals[-1][1]
 
+
+    @property
+    def empty(self):
+        """Return True iff the interval is empty"""
+        return not self.intervals
+
     def show(self, img_x=1350, img_y=20, dry_run=False):
         """
         show image representing the interval