nebius/SWE-bench-extra huggingface dataset:
Repository: ifosch/accloudtant

Issue:
Missing requirements.txt file
I wanted to run accloudtant inside Docker using `FROM python:2.7-onbuild`.

This is the output of `docker build`:

```
# Executing 3 build triggers...
Step 1 : COPY requirements.txt /usr/src/app/
lstat requirements.txt: no such file or directory
```

More info on how *onbuild* works
https://hub.docker.com/_/python/

Comments:

Patch:
diff --git a/accloudtant/aws/instance.py b/accloudtant/aws/instance.py
index 4e19b2d..2073f28 100644
--- a/accloudtant/aws/instance.py
+++ b/accloudtant/aws/instance.py
@@ -62,7 +62,7 @@ class Instance(object):
     @property
     def name(self):
         names = [tag for tag in self.tags if tag['Key'] == 'Name']
-        if names is None:
+        if len(names) == 0:
             return ''
         else:
             return names[0]['Value']
diff --git a/requirements.txt b/requirements.txt
new file mode 100644
index 0000000..e6661b7
--- /dev/null
+++ b/requirements.txt
@@ -0,0 +1,5 @@
+boto3==1.1.4
+botocore==1.2.10
+click==4.1
+requests==2.8.1
+tabulate==0.7.5


Test patch:
diff --git a/tests/aws/test_instance.py b/tests/aws/test_instance.py
index d90e2c5..a016f7b 100644
--- a/tests/aws/test_instance.py
+++ b/tests/aws/test_instance.py
@@ -73,6 +73,57 @@ def test_instance():
     assert(instance.best == 0.293)
 
 
+def test_unnamed_instance():
+    az = 'us-east-1b'
+    region = 'us-east-1'
+    instance_data = {
+        'id': 'i-1840273e',
+        'tags': [],
+        'instance_type': 'r2.8xlarge',
+        'placement': {
+            'AvailabilityZone': az,
+        },
+        'state': {
+            'Name': 'running',
+        },
+        'launch_time': datetime.datetime(
+                2015,
+                10,
+                22,
+                14,
+                15,
+                10,
+                tzinfo=tzutc()
+            ),
+        'console_output': {'Output': 'RHEL Linux', },
+    }
+
+
+    ec2_instance = MockEC2Instance(instance_data)
+    instance = accloudtant.aws.instance.Instance(ec2_instance)
+
+    assert(instance.id == ec2_instance.id)
+    assert(instance.reserved == 'No')
+    assert(instance.name == '')
+    assert(instance.size == ec2_instance.instance_type)
+    assert(instance.availability_zone == az)
+    assert(instance.region == region)
+    assert(instance.operating_system == 'Red Hat Enterprise Linux')
+    assert(instance.key == 'rhel')
+    assert(instance.state == ec2_instance.state['Name'])
+    assert(instance.current == 0.0)
+    assert(instance.best == 0.0)
+
+    with pytest.raises(ValueError):
+        instance.reserved = 'Maybe'
+
+    instance.current = 0.392
+    instance.best = 0.293
+
+    assert(instance.current == 0.392)
+    assert(instance.best == 0.293)
+
+
 def test_guess_os():
     instance_data_win = {
             'id': 'i-912a4392',