Repository: conan-io/conan

Issue:
[bug] Computing dependency graph fails due to iterating over a boolean
### Environment details

* Operating System+version:
```
Linux x86_64, Ubuntu 20.04.6 LTS
```
* Compiler+version: 
```
compiler=gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0
compiler.cppstd=gnu14
compiler.libcxx=libstdc++11
```
* Conan version: 2.1.0
* Python version: 3.8


### Steps to reproduce

1. Install conan version 2.1.0
2. Use python api to call 
```
conan_api.graph.load_graph_consumer(path, None, None,
       None, None,
       profile_host, profile_build, None, None,
       False)
```
Where path refers to directory that conanfile.py is in
3. Observe failure
```
  File "/usr/local/lib/python3.8/dist-packages/conans/client/graph/proxy.py", line 151, in should_update_reference
    return any(name == "*" or reference.name == name for name in update)

TypeError: 'bool' object is not iterable
```

This failure does not occur in Conan version 2.0.17
This issue seems to have originated from this commit: https://github.com/conan-io/conan/commit/0bad0d1ca186e97ac08c1cb16c45782c0da681ba#diff-cb762ed907b992f9c0a13f229acd541bd559e84bd2a9dc7ce3c2b28e6febca57

### Logs

Traceback:
```
======== Computing dependency graph ========
No LSB modules are available.
Failed to generate dependency graph. Make sure the target package and its dependencies are built and available in local cache.
Traceback (most recent call last):
    deps_graph = conan_api.graph.load_graph_consumer(path, None, None,
  File "/usr/local/lib/python3.8/dist-packages/conan/api/subapi/graph.py", line 148, in load_graph_consumer
    deps_graph = self.load_graph(root_node, profile_host=profile_host,
  File "/usr/local/lib/python3.8/dist-packages/conan/api/subapi/graph.py", line 180, in load_graph
    deps_graph = builder.load_graph(root_node, profile_host, profile_build, lockfile)
  File "/usr/local/lib/python3.8/dist-packages/conans/client/graph/graph_builder.py", line 52, in load_graph
    new_node = self._expand_require(require, node, dep_graph, profile_host,
  File "/usr/local/lib/python3.8/dist-packages/conans/client/graph/graph_builder.py", line 92, in _expand_require
    new_node = self._create_new_node(node, require, graph, profile_host, profile_build,
  File "/usr/local/lib/python3.8/dist-packages/conans/client/graph/graph_builder.py", line 316, in _create_new_node
    resolved = self._resolve_recipe(require.ref, graph_lock)
  File "/usr/local/lib/python3.8/dist-packages/conans/client/graph/graph_builder.py", line 214, in _resolve_recipe
    result = self._proxy.get_recipe(ref, self._remotes, self._update, self._check_update)
  File "/usr/local/lib/python3.8/dist-packages/conans/client/graph/proxy.py", line 25, in get_recipe
    resolved = self._get_recipe(ref, remotes, update, check_update)
  File "/usr/local/lib/python3.8/dist-packages/conans/client/graph/proxy.py", line 52, in _get_recipe
    if not (check_update or should_update_reference(reference, update)):
  File "/usr/local/lib/python3.8/dist-packages/conans/client/graph/proxy.py", line 151, in should_update_reference
    return any(name == "*" or reference.name == name for name in update)

TypeError: 'bool' object is not iterable
```


Discussion:

Resolving patch:
diff --git a/conans/client/graph/proxy.py b/conans/client/graph/proxy.py
--- a/conans/client/graph/proxy.py
+++ b/conans/client/graph/proxy.py
@@ -147,5 +147,8 @@ def _download(self, ref, remote):
 def should_update_reference(reference, update):
     if update is None:
         return False
+    # Old API usages only ever passed a bool
+    if isinstance(update, bool):
+        return update
     # Legacy syntax had --update without pattern, it manifests as a "*" pattern
     return any(name == "*" or reference.name == name for name in update)


Test patch: